package com.biz.primus.base.vo.member;

import com.google.common.collect.Lists;
import java.io.Serializable;
import java.util.List;
import java.util.Optional;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 会员信息Vo
 *
 * @author david-liu
 */
@Getter
@Setter
public class MemberInfoVo implements Serializable {

    private static final long serialVersionUID = 338469708421969770L;

    /**
     * 会员ID
     */
    private Long memberId;

    /**
     * 会员标签ID集合
     */
    private List<Long> memberTagIds;

    /**
     * 会员等级
     */
    private Integer memberLevel;

    public List<Long> getMemberTagIds() {
        return Optional.ofNullable(this.memberTagIds).orElse(Lists.newArrayList());
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.JSON_STYLE);
    }
}
